package com.mongodb.mongodb;

import lombok.Data;
import org.springframework.data.annotation.Id;
import java.io.Serializable;

@Data
public class User implements Serializable {
    private static final long serialVersionUID = 1L;
    // @id这个注解来对应mongo的_id这个字段
    @Id
    private String _id;
    private int id;
    private String name;
    private int age;
    private Long createTime;
}
